package com.literature.search.file.entity.dto;

import com.literature.search.core.common.SortConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @Author: DangKong
 * @Date: 2023/3/21 00:13
 * @Description:
 */

@Data
@ApiModel("搜索参数")
public class SearchAllDTO {

    @ApiModelProperty("搜索关键字")
    @NotNull
    private String keyword;

    @ApiModelProperty(value = "上传日期范围-起始日期",notes = "默认为空",example = "2023-03-23 11:34:54")
    private String startDate;

    @ApiModelProperty(value = "上传日期范围-结束日期",notes = "默认为空",example = "2023-03-23 11:34:54")
    private String endDate;

    @ApiModelProperty(value = "排序方式",notes = "默认按照相关性得分降序排序",example = SortConstant.SCORE,allowableValues = "score,uploadDate,like,download,view,collect")
    private String sort = SortConstant.SCORE;

    @ApiModelProperty(value = "升序还是降序",notes = "默认降序",example = SortConstant.DESC,allowableValues = "asc,desc")
    private String order = SortConstant.DESC;

    @ApiModelProperty(value = "每页显示条数",notes = "默认10条",example = "10")
    private Integer pageSize = 10;

    @ApiModelProperty(value = "当前页码",notes = "默认第一页",example = "1")
    private Integer pageNum = 1;

    @ApiModelProperty(value = "是否来源于图片",notes = "默认来源于图片",example = "true")
    private Boolean isFromImage = true;

    @ApiModelProperty(value = "是否来源于文本",notes = "默认来源于文本",example = "true")
    private Boolean isFromText = true;

    @ApiModelProperty(value = "是否检索英文文档",notes = "默认检索",example = "true")
    private Boolean isEnglish = true;

    @ApiModelProperty(value = "是否检索中文文档",notes = "默认检索",example = "true")
    private Boolean isChinese = true;


    @ApiModelProperty(value = "是否检索上传人",notes = "默认检索",example = "true")
    private Boolean isSearchUploader = true;

    @ApiModelProperty(value = "是否检索文件名",notes = "默认检索",example = "true")
    private Boolean isSearchFileName = true;

}
